<template>
  <!-- vue3组件中的模板结构可以没有根标签div -->
  <div class="app">
    <h3>我是App组件（祖）,{{ car.name }}--{{ car.price }}</h3>
    <button @click="getUrl">获取URL</button>
    <Child :car="car"></Child>
  </div>
</template>

<script>
import { reactive, toRefs, provide } from "vue";
import Child from "./components/Child";

export default {
  name: "App",
  // eslint-disable-next-line vue/no-unused-components
  components: { Child },

  setup() {
    let car = reactive({
      name: "奔驰",
      price: "40w",
    });
    function getUrl(){
      let url = [1,2,3,4,5,12,1,2,3,4,5]
    let newUrl =  [...new Set(url)]
    console.log(newUrl);
    }
    // provide("car", car);
    return {
      car,
      getUrl
    };
  },
};
</script>

<style>
.app {
  background-color: gray;
  padding: 10px;
}
</style>
